package main

import "fmt"

func main() {
	fmt.Println("请输入一个字符串：")
	reader := bufio.NewReader(os.Stdin)
	s1, _ := reader.ReadString('a')
	fmt.Println(s1)
}

type AnimalAction interface {
	eat()
	sleep()
}

type Animal struct {
	name string
	age  int
	food string
}

type Dog struct {
	Animal
	ww string
}

type Cat struct {
	Animal
	mm string
}

func (dog Dog) eat() {
	println(dog.name, "eat ", dog.food)
}

func testInterface(action AnimalAction) {
	action.eat()
	action.sleep()
}
